package com.bingbing.back.controller;

import com.bingbing.back.dto.SchoolInfoDto;
import com.bingbing.back.dto.SchoolMajorScoreDto;
import com.bingbing.back.dto.VoluntaryDto;
import com.bingbing.back.service.VoluntaryService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/voluntary")
public class VoluntaryController {
    @Resource
    private VoluntaryService voluntaryService;

    /**
     * 返回智能填报筛选的专业对应的学校
     * @param type =0全部，=1可冲击，=2较稳妥，=3可保底
     * @param dto 包含stuScore考生成绩，可包含majorName专业名称schoolName学校名称
     * @return
     */
    @RequestMapping("/voluntaryMajor")
    public List<SchoolMajorScoreDto> voluntaryMajor(int type, VoluntaryDto dto){
        return voluntaryService.voluntaryMajor(type, dto);
    }
}
